exports.addTeamMember = (req,res) => {

    //获取参数信息
    var bodyParams = req.routeInfo.bodyParams;

    //新增用户的ID
    var newUserId = 0;  

    //新增员工信息
    function addUser(cb){

        R.SEND_HTTP(
            req,
            res,
            {
                url: CORE_APIConfig.coreAPI.userAdd.Request_Api_Url,
                method : 'POST',
                data   : {
                    u_username      : bodyParams.u_username,
                    u_password      : bodyParams.u_password,
                    u_nickname      : bodyParams.u_nickname,
                    u_phone         : bodyParams.u_phone,
                    u_create_time   : common.nowTime(false),
                    u_is_activation : bodyParams.u_is_activation,
                    u_type          : bodyParams.u_type,
                    u_master_osid   : bodyParams.u_master_osid

                }
            },
            function (data) {

                newUserId = data.result;

                cb();
                
            }
        )

    }

    //将该员工加入节点
    function addUserToNode(cb){

        R.SEND_HTTP(
            req,
            res,
            {
                url: CORE_APIConfig.coreAPI.userOrganizationalMiddleAdd.Request_Api_Url,
                method : 'POST',
                data   : {
                    uom_osid : bodyParams.os_id,
                    uom_uid  : newUserId

                }
            },
            function (data) {

                cb();
                
            }
        )
    }

    F.Serial([addUser,addUserToNode],() => {
        RES.successResponse(res);
    })

}